<?php

namespace App\Modules\Apicrzs\Http\Controllers\Users;

use App\Modules\Apicrzs\Http\Controllers\BaseApicrzsController;
use App\Modules\Apicrzs\Services\Users\UserBillServices;
use App\Traits\CryptAES;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;

class UserBillController extends BaseApicrzsController
{

    public function __construct(UserBillServices $service)
    {

        $token =  \request()->header('token');
        $user_info = CryptAES::decryptToken($token,'user_grzq');
        $this->user_id = $user_info['data']['user_id']??0;

        $this->service = $service;
    }
    // 提现列表
    public function balanceList(Request $request): JsonResponse
    {
        $params = $request->all();
        $result = $this->service->lists($params);

        return $this->sendApiSuccess($result, $this->service->getError());
    }



}
